// 文章路由模块
const express = require('express');
const router = express.Router();
const expressJoi = require('@escook/express-joi')
const articale_handler = require('./router_handler/articale.js');
const { newdata_cate_schema,datecate_cate_schema,query_cate_schema,update_cate_schema, } = require('../schema/article');
// TODO: 新增文章路由模块
router.post('/add',expressJoi(newdata_cate_schema),articale_handler.addArticle);
// TODO: 获取文章列表数据路由模块
router.get('/list',articale_handler.listArticle);
// TODO: 根据id删除文章数据路由模块
router.post('/text/delete',expressJoi(datecate_cate_schema),articale_handler.deldeteArticleById);
// TODO: 根据id获取文章详情路由模块
router.post('/text/query',expressJoi(query_cate_schema),articale_handler.queryArticleById);
// TODO: 根据id更新文章信息路由模块
router.post('/text/update',expressJoi(update_cate_schema),articale_handler.updateArticleById);
module.exports = router;